package cn.sofwin.day0108;

import java.util.Scanner;

public class Test02 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.print("请输入一个数：");
        int number = sc.nextInt();
        System.out.println("根据这个值可以得到以下加法表：");

        for (int i = 0; i <= number/2; i++) {
            for (int j = 0; j <= number; j++) {
                if (i + j == number) {
                    System.out.println(i + " + " + j + " = " + number);
                }
            }

        }
    }
}
